package com.sijobe.installer;

import java.awt.EventQueue;

/**
 * This class is the entry point for the installer, the GUI comes out of 
 * here. 
 * 
 * Please note that this program has been written to be compatible with Java
 * version 1.4 and above. Please do NOT break backwards compatibility as this
 * will affect some users (specifically MAC owners)
 * 
 * TODO: A console option will be available so that mods can be installed 
 * from there.
 *
 * @author simo_415
 */
public class Installer {

   /**
    * @param args - The arguments passed in on startup
    */
   public static void main(String[] args) {
      // Future enhancement - check if GUI or not
      // -install [DIR], -backup mcjar, -backup worlds, -backup world <NAME>, -help

      try {
         EventQueue.invokeLater(new Runnable() {
            public void run() {
               try {
                  GuiMain window = new GuiMain();
                  window.frameModInstaller.setVisible(true);
               } catch (Exception e) {
                  e.printStackTrace();
               }
            }
         });
      } catch (Exception e) {
         System.err.println("A problem occurred, please report this message to the owner of the mod.");
         e.printStackTrace();
      }
   }

}
